<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:context=".bookings.ui.BookingFragment">

<androidx.constraintlayout.widget.ConstraintLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <TextView
        android:id="@+id/textViewEstablishmentTitle"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:textColor="@color/md_theme_primary"
        android:layout_margin="@dimen/padding_medium"
        android:textSize="16sp"
        android:textStyle="bold"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        tools:text="Янки" />

    <androidx.cardview.widget.CardView
        android:id="@+id/dateTimeCard"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginVertical="@dimen/padding_small"
        android:layout_marginHorizontal="@dimen/padding_medium"
        app:cardCornerRadius="@dimen/card_corner_radius"
        app:layout_constraintTop_toBottomOf="@id/textViewEstablishmentTitle"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent">

        <androidx.recyclerview.widget.RecyclerView
            android:id="@+id/dateTimeRecycler"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
    </androidx.cardview.widget.CardView>

    <TextView
        android:id="@+id/textViewHallTitle"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_margin="@dimen/padding_medium"
        android:gravity="center_horizontal"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/dateTimeCard"
        app:layout_constraintEnd_toEndOf="parent"
        tools:text="Зал 1" />


    <androidx.cardview.widget.CardView
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_margin="@dimen/padding_medium"
        app:cardCornerRadius="@dimen/card_corner_radius"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toBottomOf="@id/textViewHallTitle"
        app:layout_constraintBottom_toTopOf="@id/buttonBook">

        <com.example.booking.common.ui.view.ScrollablePlacesView
            android:id="@+id/placesView"
            android:layout_height="match_parent"
            android:layout_width="match_parent" />
    </androidx.cardview.widget.CardView>

    <Button
        android:id="@+id/buttonBook"
        android:theme="@style/SecondaryColor"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="@dimen/padding_medium"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        android:text="@string/book"
        app:layout_constraintBottom_toBottomOf="parent"
        />
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>